<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> 飛羽主題攝影 </title>
<link href="css/photo.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/btn.css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.js"></script>
<script type="text/javascript" src="js/slideshow.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $(".hoverNews , .hoverWorking , .hoverGown , .hoverCos , .hoverLogo , .hoverLogo2 , .hoverAbout , .hoverInfor, .hoverOnline , .hoverContact").css("opacity","0");
    $(".hoverNews , .hoverWorking , .hoverGown , .hoverCos , .hoverLogo , .hoverLogo2 , .hoverAbout , .hoverInfor, .hoverOnline , .hoverContact").hover(function () {
        $(this).stop().animate({
            opacity: 1
        }, "fast");
    },
    function () {
        $(this).stop().animate({
            opacity: 0
        }, "fast");
    });
});
</script>

<script type="text/javascript" src="js/image.gallery.js"></script>
<script type="text/javascript" src="js/jquery.plugin.fullscreen.js"></script>
<script type="text/javascript" src="js/jquery.plugin.fadeAffect.js"></script>
<script type="text/javascript" src="js/page.js"></script>
<script type="text/javascript">
  $(function(){
	page_fullscreen.init();
    $('#btnFull').click(function(){
        page_fullscreen.start();
    });
    $('#btnExit').click(function() {
        page_fullscreen.end();
    });
    
  	page_transition.init({left:'0'});
  	
  	//center the first image
  	 var showimgObj = $('.sarea img').get(0);
	if(showimgObj.width > 732)
				showimgObj.width = 732;
	 if(showimgObj.height < 488)
	{
		var margintop = (518 - showimgObj.height)/2;
		  	//margintop -= 20;
		  $(showimgObj).css('margin-top',margintop+"px");	
	}
	//adjust navigation bar
	//varaible global_navicontroller_bar_size init in page_transition.init function
	var navigationbar_with = global_navicontroller_bar_size;
	if(navigationbar_with > 800)
		navigationbar_with = 800;
	 $(".normal .photo-page2-2").css('width',navigationbar_with+'px');
	 var margin_left = (957 - navigationbar_with - 86 - 62)/2;

	 $(".normal .photo-page2-1").css("margin-left",margin_left+'px');
  });
</script>
</head>
<body >
<div id="wrap"><!-- start #wrap //-->
<div id="main" class="clearfix"><!-- start #main //-->
<!-- start #top //-->
<?php 
include_once('top.php');
include_once('util.php');
include_once('conn.php');
include_once('inc/class.thumnail.php');

$nid = $_REQUEST['nid'];
$title = make_safe($_REQUEST['title']);
$sql = sprintf("SELECT * FROM product2 where nid = %d AND `title`='%s'", $nid,$title);
$result = mysql_query($sql);
$photos = array();
while($photo = mysql_fetch_assoc($result))
{
	$photos[] = $photo;
	$srcImage = $photo['images'];
	$desc = $srcImage.'-68x68.jpg';
	if(!file_exists($desc))
	{
		make_thumnail($srcImage,$desc ,68,68,'4');
	}
}

/*
if ($photo == null) {
    Util::jsAlert('查找的相册不存在', 'gown.php');
}*/
?>
<!-- end #top //-->
<script language="javascript">
function addFacebook() {
 
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(window.location.href)+'&t='+encodeURIComponent('<?php echo $title;?>'),'_blank');
}
</script>
<div id="all">
<div id="photo-tit">
<ul>
<li>SHOW ROOM</li>
<li><?php echo $photos[0]['BigClassName'];?></li>
<li><?php echo $title;?></li>
    </ul>
  </div>
 <div id="photo-tit2">
    <ul>
     <li><a href="#" id="btnFull"><img src="images/full.png" width="20" height="20" /></a></li>
    <li><a href="#" onclick="javascript:addFacebook();return false;"><img src="images/fb.png" width="20" height="20" /></a></li>
    </ul>
  </div>
  <div class="sarea normal" style="position:relative;height:518px;top:20px;">
<?foreach ($photos as $index=>$photo):?>
<div class="photo-b" style="position:relative;margin-top:0px;"> 
	
    <a href="#">
        <img src="<?php echo $photo['images']; ?>" style="max-height:488px;"/>
    </a>
    
</div>
<?php endforeach;?>
</div>
<div id="photo-page2" class="normal">
  <div class="photo-page2-1"> <a href="#" class="navicontroller_prev"><img src="images/photo-control-prev.png" width="43" height="88" /></a></div>
  
  <div class="photo-page2-2" style="overflow:hidden;">
  	<div class="navicontroller" style="height:70px;width:99999999px; position:relative;">
    <?foreach ($photos as $index=>$photo):?>
    <div class="photo-page2-2-bg"> 
      <div class="photo-page2-2-list">
       <a href="#"><img src="<?php echo $photo['images'].'-68x68.jpg'; ?>" width="68" height="68" /></a>
      </div>
  	</div>
  	<?php endforeach;?>
  	</div>
</div>
  <div class="photo-page2-3"> 
  <a href="#" class="navicontroller_next"><img src="images/photo-control-next.png" width="43" height="88" /></a>
  </div>
</div>

</div><!-- end #main //-->
</div><!-- end #wrap //-->

<div class="sarea" id="fullScreen"><!-- Full Screen Start-->
    <div id="gallery" style="width: 100%; height: 100%;">
    <?foreach ($photos as $photo):?>
    <div class="photo-b" style="margin-top:0px;"> 
         <img src="<?php echo $photo['images']; ?>"/>
    </div>
    <?php endforeach;?>
    </div>
    <div style="border: 0; clear: both; height: 0px; width: 0px"></div>
<div id="photo-page2">
  <div class="photo-page2-1"><a href="#" class="navicontroller_prev"><img src="images/photo-control-prev.png" width="43" height="88" /></a></div>
  
  <div class="photo-page2-2" style="width:800px;overflow:hidden;">
  	<div class="navicontroller" style="height:70px;width:99999999px;position:relative;">
    <?foreach ($photos as $index=>$photo):?>
    
    <div class="photo-page2-2-bg"> 
      <div class="photo-page2-2-list">
       <a href="#"><img src="<?php echo $photo['images'].'-68x68.jpg'; ?>" width="68" height="68" /></a>
      </div>
  	</div>
  	<?php endforeach;?>
  	</div>
</div>
  <div class="photo-page2-3"> 
  <a href="#" class="navicontroller_next"><img src="images/photo-control-next.png" width="43" height="88" /></a>
  </div>
</div>

  <a id="btnExit" href="#" style="position: absolute; top: -30px; left: -30px;" alt="exit-full-screen" title="exit-full-screen"><img src="images/btn_exit_fullscreen.gif" width="120"/></a>
</div>

</div><!-- Full Screen End -->
<?php include_once('down.php');?>
</body>
</html>
